#ifndef _FS_OPERATION_H_
#define _FS_OPERATION_H_

#include <stdbool.h>
#include <stdint.h>
// 定义文件类型
typedef enum {
    FILE_TYPE_FILE = false,
    FILE_TYPE_DIRECTORY = true
} FileType;

// 定义文件节点结构
typedef struct FileNode {
    char name[32];
    bool type;
    struct FileNode *parent;
    struct FileNode *first_child;
    struct FileNode *next_sibling;

    char *data;
    int data_size;
} FileNode;


FileNode** command_ls(char *path, int *count);

void command_touch(char *path);

void command_rm(char *path);

void command_mkdir(char *path);

char* command_cat(char *path);

void command_write(char *path, char *data);

extern char writing_file[128];
extern int8_t writing_flag;
extern int8_t chunk_count;
#endif